﻿using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Services;
using Rechargeable.Machines.Dto;
using Rechargeable.Machines;
using Volo.Abp.Application.Dtos;
using System.Threading.Tasks;
using Rechargeable.Products.Dtos;

namespace Rechargeable.Machines
{
    public interface IMachineAppService : ICrudAppService<
        MachineDto, Guid, PagedAndSortedResultRequestMachineDto,
        CreateUpdateMachineDto, CreateUpdateMachineDto
        >
    {
        Task<GetExpireTimeDto> GetCheckExpireTime(InputCheckExpireTimeDto inputCheckExpireTimeDto);

        /// <summary>
        /// 删除机器
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        //Task Delete(Guid id);

        /// <summary>
        /// 解绑机器，返回剩余时间
        /// </summary>
        /// <param name="machineId"></param>
        /// <returns></returns>
        Task<Guid> Relieve(Guid machineId);

        /// <summary>
        /// 开启自动续费
        /// </summary>
        /// <param name="machineId"></param>
        /// <returns></returns>
        Task AutoRecharge(Guid machineId);

        /// <summary>
        /// 获取开通的商品
        /// </summary>
        /// <returns></returns>
        Task<List<ProductDto>> GetUseProduct();
    }
}
